
from util.pymysql_util import *



if __name__ == '__main__':
    insert_sql = "insert into user(user_name,password,create_date) values ('hj2','111111', '" + datetime.now().strftime("%Y-%m-%d %H:%M:%S")+"')"

    connection,cursor = None,None
    try:
        connection,cursor = get_connection_cursor()
        execute_(insert_sql,cursor)
        commit_(connection)
    except BaseException as e:
        print(e)
        rollback_(connection)
    finally:
        close_(connection,cursor)